package com.mzpai.web.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mzpai.product.model.ShareInfo;
import com.mzpai.product.service.ShareInfoService;
import com.mzpai.vo.ResponseVo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
 *
 * <b>门店基本信息 | Controller</b><br>
 *
 * yanglijun 2021-03-20 09:53:39
 * 
 *  @version 1.0.0
 *
 */
@Api(value = "分享接口")
@Controller
@RequestMapping("/shareInfo")
public class ShareInfoController extends BaseController {
	
	@Autowired 
	private ShareInfoService shareInfoService;
	/** 
	*
	* 查询列表 
	* @throws Exception
	*/
	@ApiOperation(value = "查询商品分享信息")
	@RequestMapping(value = "/getProductList")
	@ResponseBody
	public ResponseVo<List<ShareInfo>> getProductList() throws Exception {
		ResponseVo<List<ShareInfo>> res=new ResponseVo<List<ShareInfo>>();
		res.setCode(200);
		Map<String, Object> map = new HashMap<String,Object>();
		map.put("kind", "1");
		res.setResult(shareInfoService.getList(map ));
		return res;
	}
	
	
	
	/** 
	*
	* 查询列表 
	* @throws Exception
	*/
	@ApiOperation(value = "查询门店分享信息")
	@RequestMapping(value = "/getStoreList")
	@ResponseBody
	public ResponseVo<List<ShareInfo>> getStoreList() throws Exception {
		ResponseVo<List<ShareInfo>> res=new ResponseVo<List<ShareInfo>>();
		res.setCode(200);
		Map<String, Object> map = new HashMap<String,Object>();
		map.put("kind", "2");
		res.setResult(shareInfoService.getList(map));
		return res;
	}
	
	
	
	
}